﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace vngoodlife.Singleton
{
    public sealed class DataSingleton2
    {
        private static readonly Lazy<DataSingleton2> lazy =
            new Lazy<DataSingleton2>(() => new DataSingleton2());

        public static DataSingleton2 Instance { get { return lazy.Value; } }

        private DataSingleton2()
        {
        }

        private static DataLinQDataContext _linQContext;

        public DataLinQDataContext GetLinQContext()
        {
            if (_linQContext == null)
            {
                _linQContext = new DataLinQDataContext();
            }
            return _linQContext;
        }

    }

}